package com.qingke.pojo;

public class SedanCar extends Car {
	private String carModel;
	
	public SedanCar(String brand, String carNumber, int dailyRent, String carModel) {
		super(brand, carNumber, dailyRent);
		this.carModel = carModel;
	}

	public String getCarModel() {
		return carModel;
	}

	public void setCarModel(String carModel) {
		this.carModel = carModel;
	}

	@Override
	public double discount(int day) {
		if(day > 150) {
			return 0.7;
		} else if(day > 30) {
			return 0.8;
		} else if(day > 7) {
			return 0.9;
		}
		
		return 1;
	}

}
